package com.taobao.api.request;

import com.taobao.api.internal.util.RequestCheckUtils;
import java.util.Map;
import java.util.HashMap;

import com.taobao.api.ApiRuleException;
import com.taobao.api.BaseTaobaoRequest;
import com.taobao.api.FileItem;
import com.taobao.api.TaobaoUploadRequest;
import com.taobao.api.internal.util.TaobaoHashMap;

import com.taobao.api.response.TmallExchangeReturngoodsRefuseResponse;

/**
 * TOP API: tmall.exchange.returngoods.refuse request
 * 
 * @author top auto create
 * @since 1.0, 2018.07.25
 */
public class TmallExchangeReturngoodsRefuseRequest extends BaseTaobaoRequest<TmallExchangeReturngoodsRefuseResponse> implements TaobaoUploadRequest<TmallExchangeReturngoodsRefuseResponse> {

	
	

	/** 
	* 换货单号ID
	 */
	private Long disputeId;

	/** 
	* 留言说明
	 */
	private String leaveMessage;

	/** 
	* 凭证图片
	 */
	private FileItem leaveMessagePics;

	/** 
	* 拒绝原因ID
	 */
	private Long sellerRefuseReasonId;

	public void setDisputeId(Long disputeId) {
		this.disputeId = disputeId;
	}

	public Long getDisputeId() {
		return this.disputeId;
	}

	public void setLeaveMessage(String leaveMessage) {
		this.leaveMessage = leaveMessage;
	}

	public String getLeaveMessage() {
		return this.leaveMessage;
	}

	public void setLeaveMessagePics(FileItem leaveMessagePics) {
		this.leaveMessagePics = leaveMessagePics;
	}

	public FileItem getLeaveMessagePics() {
		return this.leaveMessagePics;
	}

	public void setSellerRefuseReasonId(Long sellerRefuseReasonId) {
		this.sellerRefuseReasonId = sellerRefuseReasonId;
	}

	public Long getSellerRefuseReasonId() {
		return this.sellerRefuseReasonId;
	}

	public String getApiMethodName() {
		return "tmall.exchange.returngoods.refuse";
	}

	public Map<String, String> getTextParams() {
		TaobaoHashMap txtParams = new TaobaoHashMap();
		txtParams.put("dispute_id", this.disputeId);
		txtParams.put("leave_message", this.leaveMessage);
		txtParams.put("seller_refuse_reason_id", this.sellerRefuseReasonId);
		if(this.udfParams != null) {
			txtParams.putAll(this.udfParams);
		}
		return txtParams;
	}

	public Class<TmallExchangeReturngoodsRefuseResponse> getResponseClass() {
		return TmallExchangeReturngoodsRefuseResponse.class;
	}

	public void check() throws ApiRuleException {
		
		RequestCheckUtils.checkNotEmpty(disputeId, "disputeId");
		RequestCheckUtils.checkNotEmpty(sellerRefuseReasonId, "sellerRefuseReasonId");
	}

	public Map<String, FileItem> getFileParams() {
		Map<String, FileItem> params = new HashMap<String, FileItem>();
		params.put("leave_message_pics", this.leaveMessagePics);
		return params;
	}
	
	

}